const Koa = require("koa");
const bodyParser = require("koa-bodyparser");
const errorHandle = require("./error-handle");
const registerRouter = require("../router");
const app = new Koa();
app.on("error", errorHandle);
app.use(bodyParser());
registerRouter(app);

module.exports = app;
